﻿/// <reference name="MicrosoftAjax.js"/>

Type.registerNamespace("YUIAspNet");

YUIAspNet.BarChart = function(element) {
    YUIAspNet.BarChart.initializeBase(this, [element]);
}

YUIAspNet.BarChart.prototype = {
    initialize: function() {
        YUIAspNet.BarChart.callBaseMethod(this, 'initialize');
    },

    initializeChartControl: function(sender, args) {
    
        if(this.get_XAxis().EnableStacking) // stacked bar chart
            this._yuiControl = new YAHOO.widget.StackedBarChart(
                this.get_ChartContainer(),
                this.get_DataSource(),
                this._BuildConfig()
            );
        else // regular bar chart
            this._yuiControl = new YAHOO.widget.BarChart(
                this.get_ChartContainer(),
                this.get_DataSource(),
                this._BuildConfig()
            );
    }
}

YUIAspNet.BarChart.registerClass('YUIAspNet.BarChart', YUIAspNet.BaseChart);